import request from "@/utils/request";

// 查询服务设施列表列表
export function listFacility(query) {
  return request({
    url: "/camp/facility/list",
    method: "get",
    params: query,
  });
}

// 查询服务设施列表详细
export function getFacility(facilityId) {
  return request({
    url: "/camp/facility/" + facilityId,
    method: "get",
  });
}

// 新增服务设施列表
export function addFacility(data) {
  return request({
    url: "/camp/facility",
    method: "post",
    data: data,
  });
}

// 修改服务设施列表
export function updateFacility(data) {
  return request({
    url: "/camp/facility",
    method: "put",
    data: data,
  });
}

// 删除服务设施列表
export function delFacility(facilityId) {
  return request({
    url: "/camp/facility/" + facilityId,
    method: "delete",
  });
}

// 查询所有启动状态服务设施类型列表
export function listByStateOpen() {
  return request({
    url: "/camp/type/listByStateOpen",
    method: "get",
  });
}
